package com.feifan.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.feifan.oa.mapper.HolidayMapper;
import com.feifan.oa.domain.Holiday;
import com.feifan.oa.service.IHolidayService;
import com.feifan.common.core.text.Convert;

/**
 * 假期名称Service业务层处理
 * 
 * @author 非凡
 * @date 2020-07-01
 */
@Service
public class HolidayServiceImpl implements IHolidayService 
{
    @Autowired
    private HolidayMapper holidayMapper;

    /**
     * 查询假期名称
     * 
     * @param id 假期名称ID
     * @return 假期名称
     */
    @Override
    public Holiday selectHolidayById(Long id)
    {
        return holidayMapper.selectHolidayById(id);
    }

    /**
     * 查询假期名称列表
     * 
     * @param holiday 假期名称
     * @return 假期名称
     */
    @Override
    public List<Holiday> selectHolidayList(Holiday holiday)
    {
        return holidayMapper.selectHolidayList(holiday);
    }

    /**
     * 新增假期名称
     * 
     * @param holiday 假期名称
     * @return 结果
     */
    @Override
    public int insertHoliday(Holiday holiday)
    {
        return holidayMapper.insertHoliday(holiday);
    }

    /**
     * 修改假期名称
     * 
     * @param holiday 假期名称
     * @return 结果
     */
    @Override
    public int updateHoliday(Holiday holiday)
    {
        return holidayMapper.updateHoliday(holiday);
    }

    /**
     * 删除假期名称对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteHolidayByIds(String ids)
    {
        return holidayMapper.deleteHolidayByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除假期名称信息
     * 
     * @param id 假期名称ID
     * @return 结果
     */
    @Override
    public int deleteHolidayById(Long id)
    {
        return holidayMapper.deleteHolidayById(id);
    }
}
